import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl";

const TCHYURL = BASEURL.TCHYURL;
const selfOperatedOrderApi = {
  //自营订单列表
  getOrderList(params) {
    let url = TCHYURL + "/supplier/selfSupportOrder/listShipper";
    return myaxios.get(url, params);
  },
  // 一键发布
  releaseOrder(params) {
    let url = TCHYURL + "/supplier/selfSupportOrder/releaseOrder";
    return myaxios.get(url, params);
  },
  // 取消
  orderCancel(params) {
    let url = TCHYURL + "/supplier/selfSupportOrder/orderCancel";
    return myaxios.get(url, params);
  },
  // 订单详情
  getDetail(params) {
    let url = TCHYURL + "/supplier/selfSupportOrder/detailShipper";
    return myaxios.get(url, params);
  },
  queryDriverAndVehicleDetail(params) {
    let url = TCHYURL + "/account/driver/queryDriverAndVehicleDetail"
    return myaxios.get(url, params)
  },
  
  planManagementOptions(params){
    let url = TCHYURL + "/supplier/planOrderInfo/dropDown"
    return myaxios.get(url, params)
  },
  //计划管理列表
  planManagementList(params){
    let url = TCHYURL + "/supplier/planOrderInfo/listPlanOrderInfo"
    return myaxios.get(url, params)
  },
  //计划管理 编辑
  planManagementEdit(params){
    let url = TCHYURL + "/supplier/planOrderInfo/updatePlanOrder"
    return myaxios.post(url, params)
  },
  //计划管理 新增
  planManagementAdd(params){
    let url = TCHYURL + "/supplier/planOrderInfo/addPlanOrder"
    return myaxios.post(url, params)
  },
  // 计划管理 详情回填
  planManagementDetails(params){
    let url = TCHYURL + "/supplier/planOrderInfo/echoPlanShipper/"+params
    return myaxios.get(url)
  },
  // 计划状态启用 开关
  changePlanStatusRequest(params){
    let url = TCHYURL + "/supplier/planOrderInfo/updatePlanStatus"
    return myaxios.post(url, params)
  },
  // 删除计划
  deletePlanRequest(params){
    let url = TCHYURL + "/supplier/planOrderInfo/deletePlanShipper/"+params
    return myaxios.get(url)
  },

};
export default selfOperatedOrderApi;
